#include <ctype.h>
#include <stdio.h>
#include <string.h>
int main(int argc, char *argv[])
{

    char str[1024];
    gets(str);

    int len = strlen(str);
    int uppha = 0, lowpha = 0, blank = 0, num = 0, ohters = 0;
    for (size_t i = 0; i < len; i++)
    {
        if (isupper(str[i]))
        {
            uppha++;
        }
        else if (islower(str[i]))
        {
            lowpha++;
        }
        else if (isblank(str[i]))
        {
            blank++;
        }
        else if (isdigit(str[i]))
        {
            num++;
        }
        else
        {
            ohters++;
        }
    }

    printf("%d %d %d %d %d", uppha, lowpha, blank, num, ohters);

    return 0;
}